<?php

function feedback_view(){//读出数据库资料，并且以table格式显示，同时分页
	$output = "";
	$query = db_select('feedback','f');
	$query -> fields('f');
	$objects = $query -> execute() -> fetchAll();
	$rows = array();
	foreach ($objects as $key => $object) {
		$row = array();
		$row['fid'] = $object -> fid;
		$row['title'] = $object -> title;
		$row['body'] = $object -> body;
		$row['email'] = $object -> email;
		$row['ftype'] = $object -> ftype;
		$row['created'] = date("Y/m/d", $object -> created);
		$rows[] = $row;
	}

	$output .= theme('pager');
	$output .= theme('feedback', array('rows' => $rows));
	$output .= theme('pager');
	return $output;
}
